import QtQuick 1.0
import com.nokia.symbian 1.1

ListItem {
    id: root

    property string questionText
    property string answerText
    property alias checked: checkBox.checked

    signal checkBoxClicked()

    subItemIndicator: true

    Row{
        id: questionRow
        anchors.top: root.paddingItem.top
        anchors.bottom: root.paddingItem.bottom
        anchors.bottomMargin: root.paddingItem.height/2
        spacing: 8

        CheckBox {
            id: checkBox
            anchors.verticalCenter: parent.verticalCenter
            onClicked: root.checkBoxClicked();
        }

        ListItemText {
            id : question
            mode: root.mode
            anchors.verticalCenter: parent.verticalCenter
            text: "Q: " + questionText
        }
    }
    Row{
        id: answerRow
        anchors.top: questionRow.bottom
        anchors.bottom: root.paddingItem.bottom
        anchors.left: parent.paddingItem.left
        anchors.leftMargin: parent.width *0.15
        spacing: 8
        ListItemText {
            id : answer
            mode: root.mode
            anchors.verticalCenter: parent.verticalCenter
            text:"A: " + answerText
        }
    }
}
